<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        ul,li{
            padding: 0;
            margin: 0;
            list-style: none;
        }
        body{
            margin: 0;
            width: 100vw;
            height: 100vh;
            background: rgb(128, 128, 128);
        }
        .box{
            display: flex;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
        }
        .nav{
            width: 1000px;
            height: 65px;
            background-color: #ffeb3b;
            display: flex;
        }
        .nav a{
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100%;
            color: white;
            font-size: 18px;
        }
        .nav>.item{
            width: 20%;
            height: 100%;
            position: relative;
            transition: .4s;
        }
        .list{
            position: absolute;
            top: 65px;
            width: 100%;
            overflow: hidden;
            max-height: 0;
            transition: .4s;
            border-radius: 0 0 10px 10px;
            background-color: #00ff0a;
        }
        .nav>.item:hover{
            background-color: aqua;
        }
        .nav>.item:hover>.list{
            max-height: 500px;
        }
        a{
            text-decoration: none;
        }
        .itemTwo:hover{
            background-color: brown;
        }
    </style>
</head>
<body>
    <div class="box">
        <ul class="nav">
            <li class="item">
                <a href="#">1</a>
                <ul class="list">
                    <li class="itemTwo"><a href="#">1.1</a></li>
                    <li class="itemTwo"><a href="#">1.2</a></li>
                    <li class="itemTwo"><a href="#">1.3</a></li>
                    <li class="itemTwo"><a href="#">1.4</a></li>
                </ul>
            </li>

            <li class="item">
                <a href="#">2</a>
                <ul class="list">
                    <li class="itemTwo"><a href="#">2.1</a></li>
                    <li class="itemTwo"><a href="#">2.2</a></li>
                    <li class="itemTwo"><a href="#">2.3</a></li>
                    <li class="itemTwo"><a href="#">2.4</a></li>
                </ul>
            </li>

            <li class="item">
                <a href="#">3</a>
                <ul class="list">
                    <li class="itemTwo"><a href="#">3.1</a></li>
                    <li class="itemTwo"><a href="#">3.2</a></li>
                    <li class="itemTwo"><a href="#">3.3</a></li>
                    <li class="itemTwo"><a href="#">3.4</a></li>
                </ul>
            </li>


            <li class="item">
                <a href="#">4</a>
                <ul class="list">
                    <li class="itemTwo"><a href="#">4.1</a></li>
                    <li class="itemTwo"><a href="#">4.2</a></li>
                    <li class="itemTwo"><a href="#">4.3</a></li>
                    <li class="itemTwo"><a href="#">4.4</a></li>
                </ul>
            </li>

        </ul>
    </div>
</body>
</html>
